//
//  UIBarButtonItem+Extension.swift
//  101weibo
//
//  Created by 劢克科技 on 2019/1/18.
//  Copyright © 2019 劢克科技. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    convenience init(imageName: String) {
        let btn = UIButton()
        btn.setImage(UIImage(named: imageName), for: .normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        self.init(customView: btn)
    }
}
